package fr.andromede.test.obj;

import java.util.LinkedList;
import java.util.List;

import org.apache.commons.lang3.ArrayUtils;

import fr.andromede.annotations.Id;
import fr.andromede.annotations.Persistance;
import fr.andromede.constantes.Strategy;

@Persistance
public class DAOIntegerAutoInc {

    @Id(Strategy.AUTO)
    private Integer     autoIncId;
    private String  libelle;
    private List<Float> linkMe;

    /**
     * 
     * @param autoIncId
     */
    public DAOIntegerAutoInc(Integer autoIncId) {
        super();
        this.autoIncId = autoIncId;
        this.linkMe = new LinkedList<Float>();
    }

    /**
     * 
     */
    public DAOIntegerAutoInc() {
        super();
        this.linkMe = new LinkedList<Float>();
    }

    /**
     * Getter de autoIncId
     * 
     * @return the autoIncId
     */
    public Integer getAutoIncId () {
        return autoIncId;
    }

    /**
     * 
     * Setter de autoIncId
     * 
     * @param autoIncId
     *            the autoIncId to set
     */
    public void setAutoIncId ( Integer autoIncId ) {
        this.autoIncId = autoIncId;
    }

    /**
     * Getter de libelle
     * 
     * @return the libelle
     */
    public String getLibelle () {
        return libelle;
    }

    /**
     * 
     * Setter de libelle
     * 
     * @param libelle
     *            the libelle to set
     */
    public void setLibelle ( String libelle ) {
        this.libelle = libelle;
    }

    /**
     * Getter de linkMe
     * 
     * @return the linkMe
     */
    public List<Float> getLinkMe () {
        return linkMe;
    }

    /**
     * 
     * Setter de linkMe
     * 
     * @param linkMe
     *            the linkMe to set
     */
    public void setLinkMe ( List<Float> linkMe ) {
        this.linkMe = linkMe;
    }

    @Override
    public String toString () {
        StringBuilder sb = new StringBuilder();
        sb.append("----------------DEBUT-DAOIntegerAutoInc-------------------").append('\n');
        sb.append("autoIncId->").append(autoIncId).append('\n');
        sb.append("libelle->").append(libelle).append('\n');
        if (this.linkMe != null) {
            sb.append("linkMe->").append(ArrayUtils.toString(this.linkMe)).append('\n');
        } else {
            sb.append("linkMe->null").append('\n');
        }
        return sb.toString();
    }

}
